package com.payment.ktb.constants;

/**
 * Created by admin on 2017/12/4.
 */

public enum ConstantsPayType {

    NOCARD(1, "无卡快捷" ),
    MPOS(2, "蓝牙卡头"), //
    QRCODE(3, "微信支付"), //
    ALIPAY(4, "支付宝支付"), //
    QQPAY(5, "QQ支付"), //
    JDPAY(6, "京东支付"), //
    UNIONPAY(7, "银联扫码"), //
    WXGZH(8, "微信公众号"), //
    ALFWH(9, "支付宝公众号"), //
    GATEWAY(10, "银联网关"), //
    UNIONH5(11, "银联H5无积分");

    private int code;
    private String name;

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    ConstantsPayType(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getStatus(int code) {

        for (ConstantsPayType constantsCustomer: ConstantsPayType.values()) {
            if (code == constantsCustomer.getCode()) {
                return constantsCustomer.getName();
            }
        }
        return "未知";
    }


}
